<?php

class Application_Model_Problems  extends Asd_Model{
    
    public function __construct($id = null) {
        parent::__construct(new Application_Model_DbTable_Problems(), $id);
    }

    public function getProblems($id = null){
        $select = $this->_dbTable->select();
        if (isset($id) && $id)
            $select->where('problem_id = ?', $id);
        return $this->_dbTable->fetchAll($select);
    }
}